FROM cubedhost/centos7-dind-node
MAINTAINER deng
RUN yum -y update&&yum -y install passwd openssl openssh-server  openssh-clients
RUN mkdir -p /var/run/sshd/
RUN  sed -i "s/UsePAM.*/UsePAM no/g" /etc/ssh/sshd_config

RUN ssh-keygen -t rsa -f /etc/ssh/ssh_host_rsa_key
RUN ssh-keygen -t rsa -f /etc/ssh/ssh_host_ecdsa_key
RUN ssh-keygen -t rsa -f /etc/ssh/ssh_host_ed25519_key
RUN echo "123456" | passwd --stdin root
ADD run.sh /run.sh
RUN chmod 755 /run.sh
EXPOSE 22

COPY daemon.json /etc/docker/daemon.json
COPY docker-compose /usr/local/bin/docker-compose
RUN chmod 755 /usr/local/bin/docker-compose
ADD fabric-assert.tar /home/fabric


#go
COPY go1.15.7.linux-amd64.tar.gz go.tar.gz
RUN tar --remove-files -C /usr/local/ -zxf go.tar.gz
RUN ln -sv /usr/local/go/bin/go /bin
RUN mkdir -p /home/data/go
ENV GOROOT /usr/local/go
ENV GOPATH /home/data/gopath
#RUN echo "export GO111MODULE=on" >> ~/.profile
#RUN echo "export GOPROXY=https://goproxy.cn" >> ~/.profile

WORKDIR /home/fabric/fabric-assert
ADD run.sh /run.sh
ENTRYPOINT ["/run.sh"]

CMD []